﻿using System;
using System.Collections.Generic;

namespace Campus.Main.Basic.InsertValues
{
    public partial class User : Default
    {
        public User():base()
        {
            InitializeComponent();
        }
        public User(List<string>  aList): base(aList)
        {
            InitializeComponent();
            id = aList[0];
            aToDb.AddItem(comboBox1,"priv");
            comboBox1.SelectedValue = aList[1];
            textBox1.Text = aList[2];
            textBox2.Text = aList[4];
            textBox3.Text = aList[5];
            textBox4.Text = aList[3];
            button2.Click += button2_Click;
        }
        private void User_Load(object sender, EventArgs e)
        {
        }

        protected override void button1_Click(object sender, EventArgs e)
        {
            aToDb.UpdateTableUser(textBox1.Text,textBox2.Text,textBox3.Text,textBox4.Text,Convert.ToString(comboBox1.SelectedValue),id);
            Close();
        }
    }

}
